The present invention relates to a multi-processor system which shares a storage other than a main (real) storage among processor in a large scale computer system, and more particularly to a virtual storage management method in a multiprocessor system equipped with a shared memory such as an extended storage of a large capacity to enable it to carry out a high-speed access.
A virtual storage system is a method of virtualizing a real storage by using an address translation table, and this method is a known art in the current large scale computer system. In this art, instructions and data are disposed on a virtual storage and a corresponding real address is obtained by an address translator which translates a virtual address, an address on the virtual storage, into a real address. An instruction is executed by using this real address. An operating system (OS) manages an address translation table used by the address translator to control the virtual storage.
FIG. 8 shows a system which realizes a virtual storage. A virtual storage 811 is a logical storage area which is referred to by a program. The virtual storage is managed by being divided into areas of a fixed length called pages. These pages are called virtual pages 812. The data of the contents of the virtual pages 812 is stored in a real storage 102 or in a paging data set 813 on a secondary storage 810. An address translation table 105 is a table which shows in which storage a data of a virtual page is being stored. Each of entries 814 of the address translation table 105 is prepared to correspond to each of the virtual pages and shows a position where data of each page is stored.
An invalid flag 205 of the page table entry 814 shows whether a real page is allocated to the corresponding virtual page or not. When the invalid flag 205 is off (valid), a real page 112 of the real storage 102 is allocated to the virtual page and the address of the real page is stored in a real page address entry 206.
On the other hand, when the invalid flag 205 is on (invalid), no real page is allocated. In this case, the contents of the corresponding virtual page are stored in a page data set 813, and an external page address entry 207 holds the address of an external page 114 of the contents.
When an access is made to a virtual page of which address translation table entry 814 is valid (that is, an invalid flag is off), an address translation mechanism of the hardware translates the virtual page address into a real page address and makes access to its contents. When an attempt is made to make reference to a virtual page of which address translation table entry 814 is invalid (that is, an invalid flag is on), an address translation operation is not completed and an interruption occurs. This is called an address translation exception interruption or a page fault interruption. When this interruption occurs, the operating system (OS) allocates a real page that can be utilized, writes the contents of the corresponding virtual page stored in the external page table entry 207 into the allocated real page, and turn the invalid flag 205 off. After the above processings are performed, it becomes possible to make access to the corresponding virtual page.
In the actual computers, a two-stage translation by using a segment table and a page table is often carried out to save the address translation table. However, their basic structures and control methods are the same as described above.
The above translation system is a known art in the field of a large scale computer system, and the details of the art are described, for example, in "Reality of the Operating System" by Yasufumi Yoshizawa, Chapter 3 "Virtual Memory System", pp. 85-124, published by Kabushiki Kaisha Shokodo, ISBN 4-7856-3503-7.
A loosely coupled multi-processor system (LCMP) which is one of the multi-processor systems shares an external storage (DISC, etc.) other than a main storage among the processors and communicates with the processor through a channel-to-channel adapter (CTCA) connected among the processors. In the LCMP system, each of the processors operates as an independent system. Therefore, even if there occurs an error in one of the processor systems, it does not affect the operations of the rest of the processors. Further, a normal processor can take over the continuous processing of the system in which an error occurred, so that a highly reliable computer system can be provided. The LCMP system having the above features is being widely employed in systems such as banking systems of which reliability is highly required. The LCMP system is a known art in the field of the computer system, and the details of the system are described, for example, in the "Iwanami Information Science Dictionary", ISBN4-00-080074-4, pp. 438, multi-processor.
FIG. 9 shows an outline of the LCMP system. In the LCMP, a plurality of processors share a storage area (an external storage) other than a main storage. In FIG. 9, a shared external storage 104 is shared by two processors, i.e. a processor A 101a and a processor B 101b. In order to have communication between the processors, the processors are connected through a channel 109 called a CTCA and communication is performed by mutually taking an image of input and output operations, that is, by regarding the other processor as an I/O unit connected to the own processor. Further, each processor has its own real storage, 102a and 102b respectively.
In order to share an external memory in the LCMP, it is necessary to carry out an exclusive control between the processors. There are two methods for the above. In one method, (1) a mechanism equipped in an external storage is used and this cannot be accessed from the other processor while one processor is using that. In the other method, (2) a software on one processor performs resource management, and when a shared resource (an external storage) is to be accessed a request is made to this software so that the shared resource is exclusively controlled. Description will be made here of the outline of the method for carrying out an exclusive access of a shared resource when each processor communicates by using the CTCA.
FIG. 10 shows the outline of the communication system using the CTCA. The CTCA appears to be an I/O unit for each processor. In this example, data is transferred from a processor A 101a to a processor B 101b. The processor A 101a first issues a write command to the CTCA. As a result, an attention interruption is applied to the processor B 101b. In correspondence with this interruption, the processor B 101b issues a read command. Thus, requests from both processors are corresponded, and data transfer is started. After a data transfer is completed, the CTCA applies an end interruption to both processors.
FIG. 11 shows the outline of the method of carrying out an exclusive control of the resource by using the above-described data transfer method. It is assumed that a resource user is disposed in the processor A 101a and a resource manager is disposed in the processor B 101b. The resource user issues a request for an exclusive use of the resource to the resource manager. This request is noticed to the manager in the processor B 101b through the CTCA. When there is no user using the resource at that time, the manager approves the user who issued the request for the use of the resource. The user who received the approval uses the resource, and issues a notification of completion after he (she) finished using the resource. The manager who received the notification of completion delivers a right of usage to other user who issued a request for using the resource.
In the above process, exclusive control of the shared resource is carried out in the LCMP.
The processing system in the LCMP is described in detail, for example, in the "Multi-virtual Storage Operating System" by Hajime Kamata, Chapter 6.3, Ohm Sha, ISBN 4-274-07170-7. Also, the hardware specification of the CTCA is described in detail in the HITAC manual, "Channel-to-channel Adapter (CTCA)", 8080-2-072.
As a drawback of the LCMP system, there is a problem that the communication between the processors is relatively slow. A tightly coupled multi-processor (TCMP) which is another method of a multi-processor system shares a real storage and a virtual storage so that its communication speed is very high (several hundred MB/sec., or faster). In contrast to the TCMP, the LCMP performs communication through a channel and a disk, so that its communication speed is at most around 1 MB/sec.
Because of the above drawback, there is a problem that the features of the LCMP cannot be sufficiently exhibited. For example, when a system resource such as a shared disk is used, an exclusive control is necessary between the processors, and an inter-processor communication becomes essential for that purpose. When an error occurred in one of the processors and the other processor is to take over the processing, it is necessary that the data used by the former processor is transferred to the other processor. In this case, the data is transferred through the channel or the CTCA in the conventional LCMP system, so that the speed is slow and the performance of the LCMP system cannot be sufficiently exhibited.
On the other hand, in the large scale computer system, there occurs a problem that an I/O operation to the disk unit becomes a bottleneck to inhibit its performance. In order to solve this problem, data of the disk is stored in the main storage in advance, and when there is a request for data input and output to and from the disk, it is not necessary to have an I/O operation to the disk when data exist in the main storage, and data transfer within only the main storage is carried out to replace the I/O operation, thereby to apparently increase the speed of the I/O operation. This system is called a virtualization of an input and an output, and is a well known art in a large scale computer.
The virtualization system of an input and an output is a system for avoiding an actual I/O operation by using the main storage as a cache. A problem in this case is that in the LCMP system, the virtualization technique of an input and an output cannot be applied to the data shared between the processors. This is because, in the LCMP, each processor is equipped with an independent main storage so that data between main storages used as cache cannot be reconciled.
For the above reason, when data is to be shared in the LCMP system, the data to be shared is arranged in a shared disk or the like and the data is communicated between the processors by using the CTCA to carry out an exclusive control thereby to make access to the shared disk.
An extended storage (ES) was developed recently as a storage for a computer system (Japanese Patent Unexamined Publication No. 59-167761). This is a storage which can carry out data transfer to and from the main storage in page unit and which can make access at a higher speed than the conventional external storage like a disk. However, in order to use the ES, it is necessary to use an exclusive access instruction to prepare a program. Therefore, a user's program cannot take advantage of the high-speed ES as it is.